package com.yang.springcloudalibaba.service;

import com.yang.springcloud.pojo.Menu;
import com.yang.springcloudalibaba.dao.MenuImp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
public class MenuServiceImp implements MenuService {
    @Autowired
    MenuImp menuImp;

    @Override
    public Map<String, Object> queryMenu(int menuid) {
        return menuImp.queryMenu(menuid);
    }

    @Override
    public Map<String, Object> queryRoleMenu(int menuid, int roleid) {
        return menuImp.queryRoleMenu(menuid, roleid);
    }

    @Override
    public Map<String, Object> insertRoleMenu(int roleid, Menu menu) {
        return menuImp.insertRoleMenu(roleid, menu);
    }

    @Override
    public Map<String, Object> queryRoleMenuAsync(int menuid, int roleid) throws InterruptedException {
        return menuImp.queryRoleMenuAsync(menuid, roleid);
    }

    @Override
    public Map<String, Object> insertRoleMenuAsync(int roleid, Menu menu) throws InterruptedException {
        return menuImp.insertRoleMenuAsync(roleid, menu);
    }

}
